{itemplate 'public/header'}
<div class="page store-share">
	<nav class="bar bar-tab"><a href="{php echo imurl('wmall/store/goods', array('sid' => $sid))}">进店购买</a></nav>
	<div class="content">
		<div class="container">
			<div class="store-wrapper">
				<div class="store-logo-wrapper">
					<div class="store-logo">
						<img src="{php echo tomedia($store['logo'])}" alt="">
					</div>
				</div>
				<div class="store-comment-info">
					<h3 class="store-title">{$store['title']}</h3>
					<div class="store-comment">
						<span class="star-rank-outline">
							<span class="star-rank-active" style="width: {$store['score_cn']}%"></span>
						</span>
						<span class="customer-score">&nbsp;{$store['score']}</span>
					</div>
					<div class="delivery-info">
						起送价￥{$store['send_price']}
						&nbsp;&nbsp;|&nbsp;&nbsp;拼车费￥{$store['delivery_price']}
						&nbsp;&nbsp;|&nbsp;&nbsp;{$store['delivery_time']}分钟
					</div>
				</div>
                {if $activity['num'] > 2}
                    <div class="activity-container">
                        {if $activity['num'] > 1}
                            {php $num = 0}
                            <div class="activity-num pull-right"> <i class="icon icon-arrow-down"></i></div>
                        {/if}
                        {loop $activity['items'] $item}
                            {php $num++}
                            <div class="tags tags-{$item['type']} {if $num > 1}activity-row hide{/if}">{$item['title']}</div>
                        {/loop}
                        {if $store['delivery_free_price'] > 0}
                            <div class="activity-row free {if $num > 1}hide{/if}">
                                满{$store['delivery_free_price']}元免拼车费
                            </div>
                        {/if}
                        {if !empty($store['hot_goods'])}
                            <div class="dashed-line"></div>
                            <div class="hot">
                                热销:
                                {loop $store['hot_goods'] $hot}
                                    {$hot['goods']}
                                {/loop}
                            </div>
                        {/if}
                    </div>
                {/if}
			</div>
			<div class="dotted-area">
				<span class="circle circle-left"></span>
				<span class="circle circle-right"></span>
				<span class="dotted-line"></span>
			</div>
			{if !empty($hot_goods)}
				<div class="goods">
					<div class="best-seller">
						<h3 class="best-seller-title">热销商品</h3>
						<ul class="best-seller-list row">
							{loop $hot_goods $hot}
								<li class="col-33">
									<a href="{php echo imurl('wmall/store/goods', array('sid' => $store['id'], 'goods_id' => $hot['id']))}">
										<div class="best-seller-img">
											<img src="{php echo tomedia($hot['thumb'])}" alt="">
										</div>
										<span class="seller-item-name">{$hot['title']}</span>
										<span class="seller-item-sale">已售{$hot['sailed']}</span>
										<div class="seller-item-price">¥<span class="price">{$hot['price']}</span></div>
									</a>
								</li>
							{/loop}
						</ul>
					</div>
				</div>
			{/if}
		</div>
	</div>
</div>
<script>
$(function() {
	$(document).on('click', '.activity-container', function(){
		if($(this).hasClass('active')) {
			$(this).find('.activity-row').addClass('hide');
			$(this).find('.activity-num i').addClass('fa-arrow-down').removeClass('fa-arrow-up');
		} else {
			$(this).find('.activity-row').removeClass('hide');
			$(this).find('.activity-num i').addClass('fa-arrow-up').removeClass('fa-arrow-down');
		}
		$(this).toggleClass('active');
	});
});
</script>
{itemplate 'public/footer'}
